package com.tarena.csmall.security.filter;

import java.io.IOException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
@Order(10)
public class FilterBean01 implements Filter {
    @Override public void doFilter(ServletRequest request, ServletResponse response,
        FilterChain chain) throws IOException, ServletException {
        HttpServletRequest httpServletReuqest=(HttpServletRequest) request;
        String uri = httpServletReuqest.getRequestURI();
        System.out.println("过滤器01请求路径uri:"+uri);
        System.out.println("过滤器01所有请求都会经过这个有效的过滤器,从而经过这个方法");
        chain.doFilter(request,response);
    }
}
